#ifdef WX_PRECOMP
#include "../wx_pch.h"
#else
#include <wx/wx.h>
#endif //WX_PRECOMP

#include "language_const.h"

bool LanguageConst::GetIdByName(const wxString& name, wxLanguage& id)
{
  for (size_t i = 0; i < WXSIZEOF(LanguageConst::Names); ++i)
  {
    if (name == LanguageConst::Names[i])
    {
      id = LanguageConst::Ids[i];
      return true;
    }
  }
  return false;
}

bool LanguageConst::GetNameById(const wxLanguage& id, wxString& name)
{
  for (size_t i = 0; i < WXSIZEOF(LanguageConst::Ids); ++i)
  {
    if (id == LanguageConst::Ids[i])
    {
      name = LanguageConst::Names[i];
      return true;
    }
  }
  return false;
}
